<?php
namespace app\index\controller;
use think\Db;
use app\index\model\Videos;
use think\facade\Config;
class Index
{

    public function getapi()
    {
        try{
            $api= Config::get('api.api');
            $data = geturl($api);
            $insert = $data['result'];
            $res=Videos::create($insert);
            echo $res->id;
        }catch (\Exception $e){
            echo "网络错误！";
        }


    }
}
